package com.example.mapper;

import com.example.pojo.bo.WorkExperienceBO;
import com.example.pojo.entity.WorkExperience;
import com.example.service.WorkExperienceService;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * 本文来演示:
 *
 * @author 赵建云
 * @create 2023/10/4
 */
public interface WorkExperienceMapper {
    @Select("select job_content,experience from work_experience where js_id=#{value}")
    WorkExperienceBO search(Integer id);

    @Select("select js_id from work_experience where profession=#{value} or position=#{value} or skill=#{value}")
    List<Integer> searchByWord(String search);

    List<Integer> searchByExperience(@Param("startExperience") Integer startExperience,@Param("endExperience") Integer endExperience);

    @Insert("insert into work_experience(js_id, company_name, profession, section, position, entry_time, dimission_time, job_content,work_performance,experience) value(#{jsId},#{companyName},#{profession},#{section},#{position},#{entryTime},#{dimissionTime},#{jobContent},#{workPerformance},#{experience})")
    int saveWorkExperience(WorkExperience workExperience);
    @Select("select * from work_experience where js_id=#{value}")
    List<WorkExperience> findWorkExperienceById(Integer jsId);

    int updateWorkExperience(WorkExperience workExperience);
}
